# -*-makefile-*-
# Makefile.global.in
# @configure_input@

# Can only be built using pgxs
USE_PGXS=1

bdr_abs_srcdir := @abs_srcdir@
PG_CONFIG :=@PG_CONFIG@
PGXS := $(shell $(PG_CONFIG) --pgxs)

vpath_build=@vpath_build@
ifeq ($(vpath_build),yes)
	VPATH := $(bdr_abs_srcdir)/$(bdr_subdir)
	USE_VPATH :=$(VPATH)
endif
GIT_WORK_TREE=${bdr_abs_srcdir}
GIT_DIR=${bdr_abs_srcdir}/.git
export GIT_DIR
export GIT_WORK_TREE

include $(PGXS)

-include ${bdr_abs_srcdir}/Makefile.custom

BDR_VERSION=$(shell awk '/^\#define BDR_VERSION / { print $3; }' ${bdr_abs_srcdir}/bdr_version.h.in | cut -d '"' -f 2)
